
//
// 110116 - AH - Created.
//

package org.soekrat.engine.wheel.test.util;

import java.io.CharArrayWriter;
import java.io.PrintWriter;

import org.soekrat.engine.network.Network;
import org.soekrat.engine.retrieval.network.NetworkRetrievalStrategy;
import org.soekrat.test.SoekratTestCase;

/**
 * <p>
 *   Test case for 
 *   {@link NetworkRetrievalStrategy} tests.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC) 
 */
public final class NetworkSpokeTestCase extends SoekratTestCase
{ 
  private Network m_network=null;
  
  /**
   * <p>
   *   Constructor.
   * </p>
   * @param name Test case name.
   */
  NetworkSpokeTestCase(String name){ super(name); }
  
  /**
   * <p>
   *   Sets
   *   {@link Network}.
   * </p>
   * @param mine {@code Network}.
   */
  void setNetwork(Network network){ m_network=network; }
  
  /**
   * <p>
   *   Gets
   *   {@link Network}.
   * </p>
   * @return {@code Mine} or {@code null} if not sat.
   */
  public Network getNetwork(){ return m_network; }
  
  /**
   * <p>
   *   Adds a resource there should been matched on of.
   * </p>
   * @param ao Resource.
   */
  //void addOneOf(AttributeObject ao){ m_oneOf.put(ao.getName(), ao); }
  
  /**
   * <p>
   *   Adds a resource that all should be matched.
   * </p>
   * @param ao Resources.
   */
  //void addAll(AttributeObject ao){ m_all.put(ao.getName(), ao); }
  
  /**
   * <p>
   *   Says that pass on this.
   * </p>
   */
  //void pass(){ m_pass=true; }
  
  /**
   * <p>
   *   Tells if do pass on this.
   * </p>
   */
  //boolean doPass(){ return m_pass; }
  
  @Override
  public String toString() 
  {
    CharArrayWriter caw=new CharArrayWriter();
    PrintWriter pw=new PrintWriter(caw);
    
    pw.println("case name="+getName());
    pw.println("Network:");
    pw.println(m_network);
    pw.println("keywords: "+getKeywords());
    // TODO
    
    pw.flush();
    return caw.toString();
  }
  
}